Skip to content

Implement UDP ingress - #8

Merged
gabivlj merged 1 commit into
mainfrom
gv/CC-9428-udp-ingress
Nov 18, 2026
Merged

gabivlj merged 1 commit into
mainfrom
gv/CC-9428-udp-ingress

Conversation

@gabivlj

@gabivlj gabivlj commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

Part of the work to make UDP ingress available in workerd and containers. Details of the protocol are in the README.
We do not have to add new iptables rules here.

@gabivlj
gabivlj force-pushed the gv/CC-9428-udp-ingress branch from 4f7e5fd to ba94836 Compare November 18, 2026 15:32
@rushilmehra

Copy link
Copy Markdown

We should set up clanky here

A CONNECT on the ingress listener with X-Dst-Protocol: udp validates
X-Dst-Addr like TCP, dials a connected udp4 socket and answers 200 exactly
like TCP. Without the header the connection is TCP; any other value returns
400. After the 200 each datagram in either direction is a 2-byte big-endian
length from 0 to 1500 followed by that many bytes. Frames toward the
container above 1500 bytes are skipped and the flow stays open. A 0xFFFF
frame (FLOW_END) from workerd is a protocol error that ends the flow; EOF
or an error on either side also ends it.

Tests cover request validation, the 200, the frame reader, round trips,
early frames, oversize drops and skips, flow end and ICMP port
unreachable. A Test workflow runs gofmt, go vet and go test -race on every
push.
@gabivlj
gabivlj force-pushed the gv/CC-9428-udp-ingress branch from ba94836 to 66bb7e4 Compare November 18, 2026 16:47
@gabivlj
gabivlj merged commit a21df5b into main Nov 18, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants